package com.yanqu.road.server.cmd.activity.deepfishing;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.DeepFishingProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.deepseafishing.DeepFishingModule;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_DEEP_FISHING_WATCH_FISH_ATLAS,desc = "图鉴消除红点")
public class DeepFishingAtlasRemoveRedDotCmd extends AbstractCommand {
    private int activityId;
    private int fishId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        DeepFishingProto.deepFishingRemoveRedDotReqMsg reqMsg = DeepFishingProto.deepFishingRemoveRedDotReqMsg.parseFrom(packet.getBytes());
        activityId = reqMsg.getActivityId();
        fishId = reqMsg.getFishId();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(DeepFishingModule.class).readAtlasSample(activityId,fishId);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
